package com.qijia.common.domain;

import java.util.Date;

/**
 * 持久化基类, 每个持久化类都应有创建日期、修改日期、创建人及修改人
 * 
 * @author Administrator
 * 
 */
public abstract class BaseData extends Object{
	
	/**
	 * 主键Key
	 */
	private Object PkKey;
	
	/**
	 * 创建日期
	 */
	private Date createTime;

	/**
	 * 修改日期
	 */
	private Date updateTime;

	/**
	 * 创建人
	 */
	private Long creatorId;

	/**
	 * 修改人
	 */
	private Long updater;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public Long getUpdater() {
		return updater;
	}

	public void setUpdater(Long updater) {
		this.updater = updater;
	}
	
	/**
	 * 获取持久化类的名称(与表名称是一一对应的)
	 * 
	 * @return
	 */
	public String getName(){
		return this.getClass().getSimpleName();
	}
	
	

	public Object getPkKey() {
		return PkKey;
	}

	public void setPkKey(Object pkKey) {
		PkKey = pkKey;
	}
	
	public String getEntityName(){
		return this.getClass().getSimpleName();
	}
	
	public static void main(String[] args){
		System.out.println(BaseData.class.getSimpleName());
	}
}
